<template>
    <div id="houdunren" ref="hd">
        后盾人
    </div>
</template>

<script>
export default {
    data() {
        return {}
    },
    created() {
        // setTimeout(() => console.log(document.querySelector('#houdunren')))
        // this.$nextTick(() => {
        //     document.querySelector('#houdunren').classList.add('red')
        // })
        //api ....
    },
    mounted() {
        // console.log(document.querySelector('#houdunren'))
        console.log(this.$refs.hd.classList.add('red'))
    }
}
</script>

<style>
.red {
    background-color: red;
}
</style>
